package com.alibaba.csp.sentinel.demo.spring.web;

import com.alibaba.csp.sentinel.init.InitFunc;
 import com.alibaba.csp.sentinel.slots.statistic.StatisticSlotCallbackRegistry;

public class DemoCallBackInitFunc implements InitFunc {
    @Override
    public void init() throws Exception {
    	StatisticSlotCallbackRegistry.addEntryCallback(DemoCallBack.class.getCanonicalName(),
            new DemoCallBack());
    	StatisticSlotCallbackRegistry.addExitCallback(DemoCallBack.class.getCanonicalName(),
            new DemoCallBack());
        System.err.println("DemoCallBackInitFunc registered");
     }
}

 
